# 案例：用while循环去算1-100得分和

i = 0
num = 0
while i < 100:  # 1-100
    i += 1
    num = num + i  # 每次累加的变化
    print(num)  # 打印最后的结果
print(f'第{i}次的结果为：{num}')
